<!--
 * @Author: yumusb
 * @Date: 2019-08-09 20:14:02
 * @LastEditors: yumusb
 * @LastEditTime: 2019-08-09 20:14:02
 * @Description: 
 -->
<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta name="keywords" content="i5短网址">
    <meta name="description" content="i5短网址">
    <title>i5短网址</title>
    <link rel="shortcut icon" href="https://www.ourpast.cn/favicon.ico" />
    <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
    <script>
        $(document).ready(function() {
            $("#search").css("height", ($(window).height()) + "px");
            $("#search").css("margin-top", "-65px");
            $('#search-btn').click(function() {
                $("#dwzdate").hide();
                $.ajax({
                    type: "post",
                    url: "./dwz.php",
                    dataType: "json",
                    data: "longurl=" + $("input[id='search-kw']").val(),
                    async: true,
                    success: function(a) {
                        console.log(a);
                        var strJson = JSON.stringify(a)
                        var obj = $.parseJSON(strJson);
                        if (obj.sina_url) {
                            $("#dwzdate").html(
                                '新浪短网址：' + obj.sina_url + '<br />' +
                                '腾讯短网址：' + obj.ten_url + '<br />' +
                                '备用短网址：' + obj.dwz_url + '<br />' +
                                '<img src="' + obj.qr + '" style="min-width:20%">'
                            );
                            $("#dwzdate").slideDown();
                        } else {
                            alert(obj.msg);
                        }
                    },
                    error: function(a) {
                        alert("失败！！");
                    }
                });
            });
        });
    </script>

    <link rel="stylesheet" href="./img/index.min.css">
</head>

<body id="page-index" style="background: #000000 url(https://cn.bing.com/th?id=OHR.QingmingBridge_ZH-CN3844222543_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp)">


    <header id="masthead" data-login-status="0">
    </header>

    <main>
        <section id="search">
            <div class="container">
                <div class="absolute-center">
                    <div class="logo center-block">
                        <h1>
                            <a href="./" title="i5短网址">
                                <img src="./img/logo-index-white.png">
                            </a>
                        </h1>
                    </div>
                    <div class="search-form form-inline">
                        <div class="form-group">
                            <label for="search-kw" class="hidden"></label>
                            <input type="search" id="search-kw" class="form-control" name="longurl" placeholder="http://www.baidu.com" autocomplete="off">
                        </div>
                        <button type="submit" id="search-btn" class="btn btn-default">生成一下</button>
                    </div>
                    <div class="center-block" id="dwzdate" style="padding: 15px; border: 1px solid transparent;margin-bottom: 20px;margin-top: 20px;background: rgba(132, 131, 137, 0.67); color: #FFF; font-size:16px;text-align:center;display:none;"></div>
                </div>
            </div>
            <div id="sb_foot"><span>©2019 i5短网址</span></div>
        </section>

</body>

</html>